/**
 * Created by wb大哥！ on 2017/8/21.
 */
$(function () {
// var navClick = document.getElementById("nav-click").children;

$("#nav-click>li").click(function(){
    $(this).siblings().removeClass("active");
    $(this).addClass("active");
})
    //toggle plugin from caibaojian.com
    $.fn.toggle = function( fn, fn2 ) {
        var args = arguments,guid = fn.guid || $.guid++,i=0,
            toggle = function( event ) {
                var lastToggle = ( $._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
                $._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
                event.preventDefault();
                return args[ lastToggle ].apply( this, arguments ) || false;
            };
        toggle.guid = guid;
        while ( i < args.length ) {
            args[ i++ ].guid = guid;
        }
        return this.click( toggle );
    };
})